package com.sky.mapper;

import com.github.pagehelper.Page;
import com.sky.annotation.AutoFill;
import com.sky.dto.CategoryPageQueryDTO;
import com.sky.entity.Category;
import com.sky.enumnation.OperationType;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface CategoryMapper {

    @AutoFill(value= OperationType.INSERT)
    void save(Category category);

    Page<Category> page(CategoryPageQueryDTO categoryDTO);

    List<Category> list(Integer type);

    void deleteById(Long id);

    @AutoFill(value=OperationType.UPDATE)
    void update(Category category);
}
